//
//  ViewController1.m
//  CCFoundation
//
//  Created by zjh on 2021/8/26.
//

#import "ViewController1.h"

@interface ViewController1 ()

@end

@implementation ViewController1

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"第二页";
    self.view.backgroundColor = UIColor.whiteColor;
    if (@available(iOS 13.0, *)) {
        UINavigationBarAppearance *barApp = [[UINavigationBarAppearance alloc] init];
        barApp.backgroundColor = UIColor.greenColor;
        barApp.shadowColor = UIColor.greenColor;
        barApp.titleTextAttributes = self.navigationController.navigationBar.titleTextAttributes;
        self.navigationController.navigationBar.scrollEdgeAppearance = barApp;
        self.navigationController.navigationBar.standardAppearance = barApp;
    }
    [self.navigationController.navigationBar setBarTintColor:UIColor.greenColor];
    self.navigationController.navigationBar.tintColor = UIColor.whiteColor;
//    [self.navigationController.navigationBar setBackgroundImage:[UIImage ] forBarMetrics:<#(UIBarMetrics)#>]
//    self.navigationController.navigationBar.backgroundColor = UIColor.greenColor;

    // Do any additional setup after loading the view.
}

- (void)configNavigationBar {
    if (@available(iOS 15.0, *)) {
        UINavigationBarAppearance *barApp = [[UINavigationBarAppearance alloc] init];
        barApp.backgroundColor = UIColor.redColor;
        barApp.shadowColor = UIColor.redColor;
        barApp.titleTextAttributes = self.navigationController.navigationBar.titleTextAttributes;
        self.navigationController.navigationBar.scrollEdgeAppearance = barApp;
        self.navigationController.navigationBar.standardAppearance = barApp;
    }
    [self.navigationController.navigationBar setBarTintColor:UIColor.redColor];
    self.navigationController.navigationBar.tintColor = UIColor.whiteColor;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
